home *** CD-ROM | disk | FTP | other *** search
/ Hackers Underworld 2: Forbidden Knowledge / Hackers Underworld 2: Forbidden Knowledge.iso / VIRUS / WORM.DOC < prev   
Text File  |  1994-07-17  |  45KB  |  751 lines

  1. Ok dudes, grabed this of a CD-ROM disk of articles, explains how the internet
  2. worm worked.
  3.             Chamelion
  4.  
  5. Journal:   Communications of the ACM  June 1989  v32 n6 p678(10)
  6.  
  7. Title:     Crisis and aftermath. (the Internet worm)
  8. Author:    Spafford, Eugene H.
  9.  
  10. Summary:   The Internet computer network was attacked on Nov 2, 1988, by a
  11. computer worm.  Although the program affected only Sun Microsystems Sun-3
  12. workstations and VAX computers running a variant of version 4 of the Berkeley
  13. Unix, the program spread over a huge section of the network.  Early the
  14. following day a number of methods for containing and eradicating the virus
  15. had been discovered and published.  It was discovered that the worm exploited
  16. flaws in the Unix operating system's security routines and used some of
  17. Unix's own utilities to propagate itself.  A complete description of the
  18. workings of the worm and its methods of entry into Unix systems are
  19. discussed.  The aftermath of the infection and the motives of Robert T.
  20. Morris, its author, are also discussed.
  21.  
  22. Full Text:
  23.  
  24. Crisis and Aftermath On the evening of November 2, 1988 the Internet came
  25. under attack from within.  Sometime after 5 p.m., a program was executed on
  26. one or more hosts connected to the Internet.  That program collected host,
  27. network, and user information, then used that information to break into other
  28. machines using flaws present in those systems' software.  After breaking in,
  29. the program would replicate itself and the replica would attempt to infect
  30. other systems in the same manner.
  31.  
  32. Although the program would only infect Sun Micro-systems' Sun 3 systems and
  33. VAX computers running variants of 4 BSD UNIX, the program spread quickly, as
  34. did the confusion and consternation of system administrators and users as
  35. they discovered the invasion of their systems.  The scope of the break-ins
  36. came as a great surprise to almost everyone, despite the fact that UNIX has
  37. long been known to have some security weaknesses (cf. [4, 12, 13]).
  38.  
  39. The program was mysterious to users at sites where it appeared. Unusual files
  40. were left in the /usr/tmp directories of some machines, and strange messages
  41. appeared in the log files of some of the utilities, such as the sendmail mail
  42. handling agent.  The most noticeable effect, however, was that systems became
  43. more and more loaded with running processes as they became repeatedly
  44. infected. As time went on, some of these machines bacame so loaded that they
  45. were unable to continue any processing; some machines failed completely when
  46. their swap space or process tables were exhausted.
  47.  
  48. By early Thursday morning, November 3, personnel at the University of
  49. California at Berkeley and Massachusetts Institute of Technology (MIT) had
  50. "captured" copies of the program and began to analyze it. People at other
  51. sites also began to study the program and were developing methods of
  52. eradicating it.  A common fear was that the program was somehow tampering
  53. with system resources in a way that could not be readily detected--that while
  54. a cure was being sought, system files were being altered or information
  55. destroyed.  By 5 a.m. Thursday morning, less than 12 hours after the program
  56. was first discovered on the network, the Computer Systems Research Group at
  57. Berkeley had developed an interim set of steps to halt its spread. This
  58. included a preliminary patch to the sendmail mail agent.  The suggestions
  59. were published in mailing lists and on the Usenet, although their spread was
  60. hampered by systems disconnecting from the Internet to attempt a
  61. "quarantine."
  62.  
  63. By about 9 p.m. Thursday, another simple, effective method of stopping the
  64. invading program, without altering system utilities, was discovered at Purdue
  65. and also widely published.  Software patches were posted by the Berkeley
  66. group at the same time to mend all the flaws that enabled the program to
  67. invade systems.  All that remained was to analyze the code that caused the
  68. problems and discover who had unleashed the worm--and why.  In the weeks that
  69. followed, other well-publicized computer break-ins occurred and a number of
  70. debates began about how to deal with the individuals staging these invasions.
  71. There was also much discussion on the future roles of networks and security.
  72. Due to the complexity of the topics, conclusions drawn from these discussions
  73. may be some time in coming.  The on-going debate should be of interest to
  74. computer professionasl everywhere, however.
  75.  
  76. HOW THE WORM OPERATED
  77.  
  78. The worm took advantage of some flaws in standard software installed on many
  79. UNIX systems.  It also took advantage of a mechanism used to simplify the
  80. sharing of resources in local area networks.  Specific patches for these
  81. flaws have been widely circulated in days since the worm program attached the
  82. Internet.
  83.  
  84. Fingerd
  85.  
  86. The finger program is a utility that allows users to obtain information about
  87. other users.  It is usually used to identify the full name or login name of a
  88. user, whether or not a user is currently logged in, and possibly other
  89. information about the person such as telephone numbers where he or she can be
  90. reached.  The fingerd program is intended to run as a daemon, or background
  91. process, to service remote requests using the finger protocol.  This daemon
  92. program accepts connections from remote programs, reads a single line of
  93. input, and then sends back output matching the received request.
  94.  
  95. The bug exploited to break fingerd involved overrunning the buffer the daemon
  96. used for input.  The standard C language I/O library has a few routines that
  97. read input without checking for bounds on the buffer involved.  In
  98. particular, the gets call takes input to a buffer without doing any bounds
  99. checking; this was the call exploited by the worm.  As will be explained
  100. later, the input overran the buffer allocated for it and rewrote the stack
  101. frame thus altering the behavior of the program.
  102.  
  103. The gets routine is not the only routine with this flaw.  There is a whole
  104. family of routines in the C library that may also overrun buffers when
  105. decoding input or formatting output unless the user explicitly specifies
  106. limits on the number of characters to be converted.  Although experienced C
  107. programmers are aware of the problems with these routines, they continue to
  108. use them.  Worse, their format is in some sense codified not only by
  109. historical inclusion in UNIX and the C language, but more formally in the
  110. forthcoming ANSI language standard for C.  The hazard with these calls is
  111. that any network server or privileged program using them may possibly be
  112. compromised by careful precalculation of the (in)appropriate input.
  113.  
  114. Interestingly, at least two long-standing flaws based on this underlying
  115. problem have recently been discovered in standard BSD UNIX commands.  Program
  116. audits by various individuals have revealed other potential problems, and
  117. many patches have been circulated since November to deal with these flaws.
  118. Unfortunately, the library routines will continue to be used, and as our
  119. memory of this incident fades, new flaws may be introduced with their use.
  120.  
  121. Sendmail
  122.  
  123. The sendmail program is a mailer designed to route mail in a heterogeneous
  124. internetwork.  The program operates in a number of modes, but the one
  125. exploited by the worm involves the mailer operating as a daemon (background)
  126. process.  In this mode, the program is "listening" on a TCP port (#25) for
  127. attempts to deliver mail using the standard Internet protocol, SMTP (Simple
  128. Mail Transfer Protocol).  When such an attempt is detected, the daemon enters
  129. into a dialog with the remote mailer to determine sender, recipient, delivery
  130. instructions, and message contents.
  131.  
  132. The bug exploited in sendmail had to do with functionality provided by a
  133. debugging option in the code.  The worm would issue the DEBUG command to
  134. sendmail and then specify a set of commands instead of a user address.  In
  135. normal operation, this is not allowed, but it is present in the debugging
  136. code to allow testers to verify that mail is arriving at a particular site
  137. without the need to invoke the address resolution routines.  By usin